//
//  NSECGRealTimeController.h
//  SpeedTest
//
//  Created by Han Mingjie on 2020/2/10.
//  Copyright © 2020 MingJie Han. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
@interface NSECGRealTimeController : NSObject{
    NSArray <NSString *>*ecg_name_array;
    NSArray <NSNumber *>*ecg_lead_status;
    NSUInteger number_for_maximum_count;
    NSUInteger last_add_ecg_index;
    NSUInteger drawed_ecg_index;
}
@property (nonatomic) NSArray <NSString *>*ecg_name_array;
@property (nonatomic) NSArray <NSNumber *>*ecg_lead_status;
@property (nonatomic) NSUInteger number_for_maximum_count;
@property (nonatomic,readonly) NSUInteger last_add_ecg_index;
@property (nonatomic,readonly) NSUInteger drawed_ecg_index;

-(BOOL)add_realtime_ECG_in_thread:(NSArray <NSArray <NSNumber *>*>* )ecg_array;

-(void)empty_all_ECG;

-(BOOL)enough_point_for_next_piece:(NSUInteger)needed_points_number;
-(void)one_piece_completed:(NSUInteger)points_number;

-(NSMutableArray <NSNumber *>*)getValueForLead:(NSString *)lead_name lenght:(NSUInteger)lenght status:(BOOL *)lead_status withDataIndex:(NSUInteger)data_index;
@end
NS_ASSUME_NONNULL_END
